#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <iostream>

using namespace std;

int longestSubsequence(vector<int>& arr, int difference) {
    int n = arr.size();
    int ret = 1;
    vector<int> dp(n + 10, 1);

    for (int i = 1; i <= n; ++i)
    {
        for (int j = i - 1; j >= 1; --j)
        {
            if (arr[j - 1] + 1 == arr[i - 1])
            {
                dp[i] = max(dp[j] + 1, dp[i]);
            }
        }

        ret = max(ret, dp[i]);
    }

    return ret;
}

int main()
{

	return 0;
}